package com.mxpio.erp.common.equipment.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mxpioframework.jpa.annotation.DictAble;
import com.mxpioframework.security.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author H2017877
 */
@Data
public class EquipmentCheckTaskExportPage implements DictAble, Serializable {

    /**时间*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Schema(description = "时间")
    private Date planStartTime;
    /**设备编号*/
    @Schema(description = "设备编号")
    private String targetCode;
    /**设备编码/名称 区域名称*/
    @Schema(description = "设备编码/名称\n区域名称")
    private String targetName;
    /**是否开机*/
    @Dict(dicCode = "yes_no")
    @Schema(description = "是否开机")
    private String eqpStatus;

    @Schema(description = "点检任务明细")
    private List<EquipmentCheckTaskDetailExport> equipmentCheckTaskDetailExportList;

    /**点巡检人*/
    @Schema(description = "点巡检人")
    private String executor;
    @Schema(description = "点巡检人")
    private String executorText;
    /**签核主管/签核时间*/
    @Schema(description = "签核主管/\n签核时间")
    private String activitiHistory;


    private Map<String, String> textMap;
    @Override
    public String putText(String key, String value) {
        if (textMap == null) {
            textMap = new HashMap<>();
        }
        return textMap.put(key, value);
    }

}
